package com.ruoyi.bookSys.domain;

import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 读者信息对象 book_reader
 * 
 * @author ruoyi
 * @date 2025-10-14
 */
public class BookReader extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 读者ID（主键） */
    private Long readerId;

    /** 读者编号（唯一，如学号/工号） */
    @Excel(name = "读者编号", readConverterExp = "唯=一，如学号/工号")
    private String readerNo;

    /** 读者姓名 */
    @Excel(name = "读者姓名")
    private String readerName;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String readerPhone;

    /** 电子邮箱 */
    @Excel(name = "电子邮箱")
    private String readerEmail;

    /** 读者类型（如：学生、教师、管理员） */
    @Excel(name = "读者类型", readConverterExp = "如=：学生、教师、管理员")
    private String readerType;

    /** 注册日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "注册日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date registerDate;

    /** 读者证过期日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "读者证过期日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireDate;

    /** 最大可借数量（默认5本） */
    @Excel(name = "最大可借数量", readConverterExp = "默=认5本")
    private Long maxBorrowNum;

    /** 当前已借数量 */
    @Excel(name = "当前已借数量")
    private Long currentBorrowNum;

    /** 读者状态（0=正常，1=冻结，2=过期） */
    @Excel(name = "读者状态", readConverterExp = "0==正常，1=冻结，2=过期")
    private String status;

    /** 删除标志（0=未删除，1=已删除） */
    private String delFlag;

    /** 图书借阅记录信息 */
    private List<BookBorrow> bookBorrowList;

    public void setReaderId(Long readerId) 
    {
        this.readerId = readerId;
    }

    public Long getReaderId() 
    {
        return readerId;
    }

    public void setReaderNo(String readerNo) 
    {
        this.readerNo = readerNo;
    }

    public String getReaderNo() 
    {
        return readerNo;
    }

    public void setReaderName(String readerName) 
    {
        this.readerName = readerName;
    }

    public String getReaderName() 
    {
        return readerName;
    }

    public void setReaderPhone(String readerPhone) 
    {
        this.readerPhone = readerPhone;
    }

    public String getReaderPhone() 
    {
        return readerPhone;
    }

    public void setReaderEmail(String readerEmail) 
    {
        this.readerEmail = readerEmail;
    }

    public String getReaderEmail() 
    {
        return readerEmail;
    }

    public void setReaderType(String readerType) 
    {
        this.readerType = readerType;
    }

    public String getReaderType() 
    {
        return readerType;
    }

    public void setRegisterDate(Date registerDate) 
    {
        this.registerDate = registerDate;
    }

    public Date getRegisterDate() 
    {
        return registerDate;
    }

    public void setExpireDate(Date expireDate) 
    {
        this.expireDate = expireDate;
    }

    public Date getExpireDate() 
    {
        return expireDate;
    }

    public void setMaxBorrowNum(Long maxBorrowNum) 
    {
        this.maxBorrowNum = maxBorrowNum;
    }

    public Long getMaxBorrowNum() 
    {
        return maxBorrowNum;
    }

    public void setCurrentBorrowNum(Long currentBorrowNum) 
    {
        this.currentBorrowNum = currentBorrowNum;
    }

    public Long getCurrentBorrowNum() 
    {
        return currentBorrowNum;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public List<BookBorrow> getBookBorrowList()
    {
        return bookBorrowList;
    }

    public void setBookBorrowList(List<BookBorrow> bookBorrowList)
    {
        this.bookBorrowList = bookBorrowList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("readerId", getReaderId())
            .append("readerNo", getReaderNo())
            .append("readerName", getReaderName())
            .append("readerPhone", getReaderPhone())
            .append("readerEmail", getReaderEmail())
            .append("readerType", getReaderType())
            .append("registerDate", getRegisterDate())
            .append("expireDate", getExpireDate())
            .append("maxBorrowNum", getMaxBorrowNum())
            .append("currentBorrowNum", getCurrentBorrowNum())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .append("bookBorrowList", getBookBorrowList())
            .toString();
    }
}
